package com.george.model.user.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.george.model.base.utils.IdWorker;
import com.george.model.user.entity.Employee;
import com.george.model.user.mapper.EmployeeMapper;
import com.george.model.user.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *
 * </p>
 *
 * @author GeorgeChan 2019/5/16 14:17
 * @version 1.0
 * @since jdk1.8
 */
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService {
    @Autowired
    private IdWorker idWorker;
    @Override
    public Employee findEmployeeById(long id) {
        Employee employee = baseMapper.findEmployeeById(id);
        return employee;
    }

    @Override
    public int addEmployee(Employee employee) {
        int res = this.baseMapper.insert(employee);
        return res;
    }
}
